package com.luchao.springcloud.service;

import com.luchao.springcloudapi.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(name = "SPRINGCLOUD-PROVIDER-DEPT", fallbackFactory = DeptClientServiceFallbackFactory.class)
public interface DeptClientService {

    @PostMapping(value = "/dept/add")
    boolean addDept(Dept dept);

    @GetMapping("/dept/getById/{id}")
    Dept getById(@PathVariable("id") long id);

    @GetMapping("/dept/getList")
    List<Dept> getlist();


}
